class Brass {
public:
  Brass(const char *s = "Nullbody", long an = -1, double bal = 0.0);
  void Deposit(double amt);          // 存款
  virtual void Withdraw(double amt); // 取款
  double Balance() const;
  virtual void ViewAcct() const; // 显示账户
  virtual ~Brass(){};

private:
  enum { MAX = 35 };
  char fullname[MAX];
  long acctNum;
  double balance;
};

// is-a
class BrassPlus : public Brass {
public:
  BrassPlus(const char *s = "Nullbody", long an = -1, double bal = 0.0,
            double m1 = 500, double r = 0.10);
  BrassPlus(const Brass &ba, double m1 = 500, double r = 0.10);
  virtual void Withdraw(double amt);
  virtual void ViewAcct() const;
  void ResetMax(double m) { maxLoan = m; }
  void ResetRate(double r) { rate = r; }
  void ResetOwes() { owesBank = 0; }

private:
  double maxLoan;  // 透支上限
  double rate;     // 透支贷款利率
  double owesBank; // 当前的透支总额
};
